/**
 * 反馈
 */
var mobileFrame = require('scripts/Core/MobileFrame.js');
//mui初始化
mui.init({
	swipeBack: true
});

//加载plusReady
if (window.plus) {
	plusReady();
} else {
	document.addEventListener("plusready", plusReady, false);
}
//plusReady
function plusReady(){
	FastClick.attach(document.body);
	//保存
	mui('header').on('tap', '#savefeedbtn', function(){
		if(!mobileFrame.IsNetWorkCanUse())return;
		var feedContent = document.getElementById('feedcontent').value;
		if (feedContent.length == 0) {
			mui.toast("请填写建议内容");
			return;
		}
		if (feedContent.length > 200) {
			mui.toast("最多不超过200字！");
			return;
		}
		mui.toast('您的建议已经提交成功');
		mui.back();
	});
}
//是否有网
function hasNet() {
	var isNet = mobileFrame.IsNetWorkCanUse();
	return isNet;
}